require.config({
    baseUrl: baseUrl,
    waitSeconds: 200,
    paths: {
        text: "libs/require/text",
        angular: "libs/angular/angular.min",
        "lib-all": "js/lib-all",
        "app-core": "js/app-core"
    },
    shim: {
        angular: {
            exports: "angular"
        },
        "lib-all": {
            deps: ["angular"]
        },
        "app-core": {
            deps: ["angular"]
        }
    }
}),
window.__v__ = window.__v__ || (new Date).getTime();
var settingJsonUrl = baseUrl + "js/setting.json?" + window.__v__;
require(["text!" + settingJsonUrl], function(settingStr) {
    window.setting = JSON.parse(settingStr),
    window.setting.version = window.__v__;
    var setting = window.setting;
    require.config({
        urlArgs: "_v=" + setting.version
    }),
    require(["angular", "lib-all", "app-core"], function(angular) {
        console.info(angular.version);
        var ngController = "";
        if (1 == route.appCtrl) {
            for (var path = route.html.substring(0, route.html.lastIndexOf(".")).split("/"), i = 0; i < path.length; i++)
                path[i] = path[i].substring(0, 1).toUpperCase() + path[i].substring(1);
            var ctrl = path.join("");
            ngController = "App." + ctrl + "Ctrl",
            deps.push("controller/" + ngController)
        }
        angular.element(document).ready(function() {
            console.log(route),
            1 == route.appCtrl && (console.log(ngController),
            window.document.body.setAttribute("ng-controller", ngController)),
            angular.bootstrap(document, [setting.appName])
        })
    })
});
